package com.zbf.设计模式1.代理模式1.动态代理1.JDK动态代理;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author: LI-CI-GAO
 * 作者: licigao
 * 日期: 2021/8/20  15:59
 * 描述:
 */
public class Test1InvioactionHandler<T> implements InvocationHandler {

    private T t;

    public Test1InvioactionHandler(T t) {
        this.t = t;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

        System.out.println("==========1========");

        Object invoke = method.invoke(t, args);

        System.out.println("==========2========");

        return invoke;
    }
}
